cmake_minimum_required(VERSION 3.15)
project(hello_triangle C CXX)

find_package(glad REQUIRED)
find_package(glfw3 REQUIRED)
find_package(opengl_system REQUIRED)
find_package(glm REQUIRED)
find_package(plog REQUIRED)

add_executable(hello_triangle 1.hello_triangle.cpp)
add_executable(hello_triangle_index 2.hello_triangle_index.cpp)
add_executable(hello_triangle_exercise1 3.hello_triangle_exercise1.cpp)
add_executable(hello_triangle_exercise2 4.hello_triangle_exercise2.cpp)
add_executable(hello_triangle_exercise3 5.hello_triangle_exercise3.cpp)

foreach(TARGET hello_triangle hello_triangle_index hello_triangle_exercise1 hello_triangle_exercise2 hello_triangle_exercise3)
    target_link_libraries(${TARGET} glad::glad glfw glm::glm plog::plog)
endforeach()